package com.hongyu.smart.village.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.hongyu.smart.village.R;
import com.hongyu.smart.village.event.Event;
import com.hongyu.smart.village.ui.base.BaseActivity;
import com.hongyu.smart.village.ui.widget.SignatureView;

import butterknife.BindView;
import butterknife.OnClick;

public class SignatureActivity extends BaseActivity {

    @BindView(R.id.view_signature)
    private SignatureView mSignView;
    @BindView(R.id.btn_clear_signature)
    private Button mBtnClear;
    @BindView(R.id.btn_complete_signature)
    private Button mBtnSave;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);



    }

    @Override
    protected void initActivityData() {

    }

    @Override
    protected void initContentView() {

    }

    @Override
    protected int getContentView() {
        return R.layout.activity_signature;
    }

    @Override
    protected void onEventProcess(Event event) {

    }
    @OnClick({R.id.btn_clear_signature,R.id.btn_complete_signature})
    public void onClick(View view){
        switch (view.getId()){
            case R.id.btn_clear_signature:
                if(mSignView!=null){
                    mSignView.clear();
                }


                break;
            case R.id.btn_complete_signature:
                if(mSignView!=null){
                    mSignView.save();
                }

                break;
        }
    }
}